package com.huwei.kafka.consumer;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 胡伟
 * @Date: 2021/1/19 14:21
 * @Description:
 */
@Component
public class KafkaConsumer {
    //监听的主题和消费组
    @KafkaListener(topics = "jiahong",groupId = "huwei")
    public void consumer(String msg){
        System.out.println("我消费了--->"+msg);
    }
}
